package designpattern.compement;

import javax.naming.Name;

/**
 * TODO:类描述
 *
 * @className: Leaf
 * @packageName: designpattern.compement
 * @author: Zhuhj
 * @version: V1.0
 * @date: 2021/4/19 22:34
 */
public class Doc extends Compement{
    public Doc(String name) {
        super(name);
    }

    @Override
    void addCompement(Compement compement) {
        System.out.println("不能加");
    }

    @Override
    void removeCompement(Compement compement) {
        System.out.println("不能移除");
    }

    @Override
    void display(int deep) {
        System.out.println(deep +" "+ getName());
    }
}
